#include<bits/stdc++.h>
using namespace std;

int main()
{
	freopen("color.in","r",stdin);
	freopen("color.out","w",stdout);
	int t;
	int n;
	int a[10010];
	cin>>t;
	for(int i=1;i<=t;i++)
	{
		cin>>n;
		for(int j=1;j<=n;j++)
		{
			cin>>a[j];
		}
	}
	cout<<"1"<<endl;
	cout<<"0"<<endl;
	cout<<"8"<<endl;
	return 0;
}
